﻿@model SILAS.Entidades.Ciudadano

@{
    ViewBag.Title = "CrearCiudadano";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section js{

    <script type="text/javascript">
        $(function () {

        $("#agregar").click(function (e) {
         alert('El ciudadano ha sido registrado exitosamente')}
        );
    </script>

}


<h2>Create2</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Ciudadano</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Nombres)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nombres)
            @Html.ValidationMessageFor(model => model.Nombres)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ApPaterno)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ApPaterno)
            @Html.ValidationMessageFor(model => model.ApPaterno)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ApMaterno)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ApMaterno)
            @Html.ValidationMessageFor(model => model.ApMaterno)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DNI)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DNI)
            @Html.ValidationMessageFor(model => model.DNI)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Sexo)
        </div>
        <div class="editor-field">
            @Html.DropDownList("Sexo") 
            @Html.ValidationMessageFor(model => model.Sexo)
        </div>

        <p>
            <input type="submit" value="Create" id="agregar" />
            
            
        </p>
    </fieldset>
    
    
   
    
}

<div>
    
    @Html.ActionLink("Regresar", "ListarCiudadanos")
</div>

